<?php

namespace App\Requests\Admin\GoodsClass;


use App\Enums\GoodsClassStatusEnum;
use App\Enums\GoodsTypeStatusEnum;
use App\Requests\BaseRequest;
use App\Traits\ValidatorTrait;
use Illuminate\Validation\Rule;

class GoodsClassSwitchStatusRequest extends BaseRequest
{
    use ValidatorTrait;

    /**
     * 字段注解
     *
     * @return array
     */
    public function attributes(): array
    {
        return [
            'id' => 'ID',
            'status' => '状态',
        ];
    }

    public function rules(): array
    {
        return [
            'id' => ['required', 'integer'],
            'status' => ['required', Rule::in(GoodsClassStatusEnum::getKeyList()),],
        ];
    }
}
